import java.util.Scanner;
public class Teacher {
    private String name;
    private int age;
    private int years;
    private String sex;
    public Teacher(String name,int age,int years,String sex){
        this.name=name;
        this.age=age;
        this.years=years;
        this.sex=sex;
    }
    public void show(){
//        Scanner in=new Scanner(System.in);
//        System.out.println("请输入教师名：");
//        name=in.next();
//        System.out.println("请输入年龄：");
//        age=in.nextInt();
//        System.out.println("请输入教龄：");
//        years=in.nextInt();
//        System.out.println("请输入教师性别：");
//        sex=in.next();
        System.out.println("教师："+name+";\n年龄："+age+"岁;\n教龄："+years+"年;\n性别："+sex);
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getYears() {
        return years;
    }

    public void setYears(int years) {
        this.years = years;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getSex() {
        return sex;
    }

}
